package mts.constants;


public enum EventType {

	ARRIVAL((byte)1),
	DEPARTED((byte)2),
	NEXT_FLOOR((byte)3);
	
	private byte val;
	
	public byte getByteValue() {
		return val;
	}
	
	private EventType(byte val) {
		this.val = val;
	}
	
	public static EventType valueOf(byte val) {
		for (EventType type: EventType.values()) {
			if (type.val == val) {
				return type;
			}
		}
		
		throw new RuntimeException("Invalid EventType - " + val);
	}
}
